package com.chenchen.code.btrace.script;

import static com.sun.btrace.BTraceUtils.*;
import com.sun.btrace.annotations.*;

/**
 * @Description:
 * @author chenchen
 * @date 2019/5/17 8:48
 */

@BTrace
public class ReturnAndDurationT {

    @OnMethod(
            clazz = "com.chenchen.code.btrace.target.BtraceTarget1",
            method = "doCall",
            location = @Location(Kind.RETURN)
    )
    public static void doCall(String userName, String hints, @Return String result, @Duration long duration) {
        println(result);
        println(strcat("duration(ms): ", str(duration / 1000000)));
    }
}
